{include file="public/header" /}
<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3><?php echo empty(!$is_examine) ? '待审核' : '添砖记录'; ?></h3>
                <h5></h5>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
    <div class="fixed-empty"></div>

    <form method="get" name="formSearch" id="formSearch">
        <div class="ds-search-form">
            <dl>
                <dt>提交人：</dt>
                <dd><input type="text" value="{$Request.get.submission_name|default=''}" name="submission_name"
                        id="search_goods_name" class="txt"></dd>
            </dl>
            <dl>
                <dt>设备名称：</dt>
                <dd><input type="text" value="{$Request.get.search_goods_name|default=''}" name="search_goods_name"
                        id="search_goods_name" class="txt"></dd>
            </dl>
            <dl>
                <dt>商品品牌：</dt>
                <dd>
                    <div id="ajax_brand" class="dssc-brand-select w180">
                        <div class="selection">
                            <input name="b_name" id="b_name" value="{$Request.param.b_name|default=''}" type="text"
                                class="txt w180" readonly="readonly" />
                            <input type="hidden" name="b_id" id="b_id" value="{$Request.param.b_id|default=''}" />
                        </div>
                        <div class="dssc-brand-select-container">
                            <div class="brand-index" data-url="{:url('Common/ajax_get_brand')}">
                                <div class="letter" dstype="letter">
                                    <ul>
                                        <li style="width: auto;"><a href="javascript:void(0);"
                                                data-letter="all">所有品牌</a></li>
                                        <li style="width: auto;"><a href="javascript:void(0);" data-letter="A">A</a>
                                        </li>
                                        <li><a href="javascript:void(0);" data-letter="B">B</a></li>
                                        <li><a href="javascript:void(0);" data-letter="C">C</a></li>
                                        <li><a href="javascript:void(0);" data-letter="D">D</a></li>
                                        <li><a href="javascript:void(0);" data-letter="E">E</a></li>
                                        <li><a href="javascript:void(0);" data-letter="F">F</a></li>
                                        <li><a href="javascript:void(0);" data-letter="G">G</a></li>
                                        <li><a href="javascript:void(0);" data-letter="H">H</a></li>
                                        <li><a href="javascript:void(0);" data-letter="I">I</a></li>
                                        <li><a href="javascript:void(0);" data-letter="J">J</a></li>
                                        <li><a href="javascript:void(0);" data-letter="K">K</a></li>
                                        <li><a href="javascript:void(0);" data-letter="L">L</a></li>
                                        <li><a href="javascript:void(0);" data-letter="M">M</a></li>
                                        <li><a href="javascript:void(0);" data-letter="N">N</a></li>
                                        <li><a href="javascript:void(0);" data-letter="O">O</a></li>
                                        <li><a href="javascript:void(0);" data-letter="P">P</a></li>
                                        <li><a href="javascript:void(0);" data-letter="Q">Q</a></li>
                                        <li><a href="javascript:void(0);" data-letter="R">R</a></li>
                                        <li><a href="javascript:void(0);" data-letter="S">S</a></li>
                                        <li><a href="javascript:void(0);" data-letter="T">T</a></li>
                                        <li><a href="javascript:void(0);" data-letter="U">U</a></li>
                                        <li><a href="javascript:void(0);" data-letter="V">V</a></li>
                                        <li><a href="javascript:void(0);" data-letter="W">W</a></li>
                                        <li><a href="javascript:void(0);" data-letter="X">X</a></li>
                                        <li><a href="javascript:void(0);" data-letter="Y">Y</a></li>
                                        <li><a href="javascript:void(0);" data-letter="Z">Z</a></li>
                                        <li><a href="javascript:void(0);" data-letter="0-9">其他</a></li>
                                    </ul>
                                </div>
                                <div class="search" dstype="search"><input name="search_brand_keyword"
                                        id="search_brand_keyword" type="text" class="text" /><a
                                        href="javascript:void(0);" class="dssc-btn-mini"
                                        style="vertical-align: top;">Go</a></div>
                            </div>
                            <div class="brand-list" dstype="brandList">
                                <ul dstype="brand_list">
                                    {notempty name="brand_list"}
                                    {foreach name="brand_list" item="val"}
                                    <li data-id='{$val.brand_id}' data-name='{$val.brand_name}'>
                                        <em>{$val.brand_initial}</em>{$val.brand_name}</li>
                                    {/foreach}
                                    {/notempty}
                                </ul>
                            </div>
                            <div class="no-result" dstype="noBrandList" style="display: none;">
                                {$Think.lang.no_brand_result}</div>
                        </div>
                    </div>
                </dd>
            </dl>
            <dl>
                <dt>审核状态：</dt>
                <dd><select name="search_goods_status"
                        id="search_goods_status" class="txt">
                        <option value="0" {if $Request.param.search_goods_status==0} selected='selected'   {/if}>未处理</option>
                        <option value="1" {if $Request.param.search_goods_status==1} selected='selected'   {/if}>审核通过</option>
                        <option value="2" {if $Request.param.search_goods_status==2} selected='selected'   {/if}>审核失败</option>
                    </select>

                    </dd>
            </dl>
            <dl>
                <dt>提交时间</dt>
                <dd>
                  <input type="text" class="txt date" name="query_start_time" id="query_start_time"
                    value="{$Request.param.query_start_time}">
                  &nbsp;–&nbsp;
                  <input id="query_end_time" class="txt date" type="text" name="query_end_time"
                    value="{$Request.param.query_end_time}">
                </dd>
              </dl>
            <div class="btn_group">
                <input type="hidden" name="type" value="{$Request.param.type}">
                <a href="javascript:void(0);" id="dssubmit" class="btn "
                    title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
                {if $search_goods_name != '' || $b_id != '' || $submission_name != ''}
                    {if $is_examine}
                    <a href="{:url('Nquipment/two_goods_wait',['type'=>$Request.param.type])}" class="btn btn-default"
                        title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
                    {else}
                    <a href="{:url('Nquipment/bicks_list',['type'=>$Request.param.type])}" class="btn btn-default"
                        title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
                    {/if}
                {/if}
            </div>
        </div>
    </form>


    <table class="ds-default-table">
        <thead>
            <tr class="thead">
                <th class="w48">序号</th>
                <th>设备名称</th>
                <th>分类&品牌</th>
                <th>规格</th>
                <th>型号</th>
                <th>审核状态</th>
                <th>提交人</th>
                <th class="w200 align-center">创建时间</th>
                <th class="w200 align-center">{$Think.lang.ds_handle}</th>
            </tr>
        <tbody>
            {notempty name="bricks_list"}
            {foreach name="bricks_list" item="question" key="key"}
            <tr id="ds_row_{$question.id}">
                <td>{$key+1}</td>
                <td>{$question.goods_name}</td>
                <td>
                    <p>{$question.class_name}</p>
                    <p class="goods-brand">{$Think.lang.ds_brand}：{$question.brand_name}</p>
                </td>
                <td>{$question.specifications}</td>
                <td>{$question.type_model}</td>

                <td>{$enterprise_status[$question['equipment_status']]}</td>
                <td>
                    {$question.name}
                </td>
                <td>{$question.created_at}</td>
                <td>
                    {if $question.equipment_status == 0}
                    <a href="javascript:void(0);" onclick="goods_verify({$question.id})" class="dsui-btn-edit"><i
                            class="iconfont"></i>审核</a>
                    {/if}
                    {if $question.equipment_status != 0}
                    <a href="javascript:void(0);" onclick="goods_content({$question.id})" class="dsui-btn-view"><i
                            class="iconfont"></i>查看</a>
                              {/if}
                </td>
            </tr>
            {/foreach}
            {else /}
            <tr class="no_data">
                <td colspan="10">{$Think.lang.ds_no_record}</td>
            </tr>
            {/notempty}
            </thead>
    </table>
    {$show_page}

</div>
<script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/jquery.mousewheel.js"></script>
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js" charset="utf-8"></script>

<script type="text/javascript">
    $(function () {
      $('#query_start_time').datepicker({
        dateFormat: 'yy-mm-dd'
      });
      $('#query_end_time').datepicker({
        dateFormat: 'yy-mm-dd'
      });
    });
    var HOMESITEURL = "{$Think.HOME_SITE_URL}";
    /* AJAX选择品牌 */
    $("#ajax_brand").brandinit();

    $('#dssubmit').click(function () {
        $('#formSearch').submit();
    });

    $('#dssubmit').click(function () {
        $('#formSearch').submit();
    });

    // 审核
    function goods_verify(ids_str) {
        _uri = ADMINSITEURL + "/Nquipment/goods_verify?id=" + ids_str;
        dsLayerOpen(_uri, '审核', '1000px', '700px');
    }

    // 详情查看
    function goods_content(ids_str) {
        _uri = ADMINSITEURL + "/Nquipment/goods_content?id=" + ids_str;
        dsLayerOpen(_uri, '详情', '1000px', '700px');
    }
</script>





{include file="public/footer" /}